<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('发布人')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="public_user" class="form-control selectpicker" data-rule="required">
                <option value="">请选择</option>
                <option value="user">系统用户</option>
                <option value="customize">自定义用户</option>
            </select>
        </div>
    </div>
    <div class="form-group" id="user" hidden>
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-source="user/user/index" data-field="nickname"
                   class="form-control selectpage" name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div id="customize" hidden>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
            <div class="col-xs-12 col-sm-8">
                <input id="c-nickname" class="form-control" name="row[nickname]" type="text" value="">
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
            <div class="col-xs-12 col-sm-8">
                <div class="input-group">
                    <input id="c-avatar" class="form-control" size="50" name="row[avatar]"
                           type="text" value="">
                    <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload"
                                  data-input-id="c-avatar"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                        <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose"
                                      data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                    </div>
                    <span class="msg-box n-right" for="c-avatar"></span>
                </div>
                <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
                                                       value="{$key}" {in name="key" value="1" }checked{/in} />
                    {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否定时发布')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="public_type" class="form-control selectpicker">
                <option value="no">不定时发布</option>
                <option value="yes">定时发布</option>
            </select>
        </div>
    </div>
    <div class="form-group" id="public_time" hidden>
        <label class="control-label col-xs-12 col-sm-2">{:__('Public_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-public_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[public_time]" type="text" value="" placeholder="请选择发布时间">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Blog_title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-blog_title" data-rule="required" class="form-control" name="row[blog_title]" type="text"
                   value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sub_title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-sub_title" class="form-control editor" name="row[sub_title]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Blog_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-blog_content" class="form-control editor" name="row[blog_content]"
                      cols="50" rows="50" placeholder="请勿插入图片或视频"></textarea>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number"-->
<!--                   value="0">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Scan_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-scan_count" data-rule="required" class="form-control" name="row[scan_count]" type="number"
                   value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Scan_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-scan_user_count" data-rule="required" class="form-control" name="row[scan_user_count]"
                   type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-share_count" data-rule="required" class="form-control" name="row[share_count]" type="number"
                   value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-share_user_count" data-rule="required" class="form-control" name="row[share_user_count]"
                   type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Praise_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-praise_count" data-rule="required" class="form-control" name="row[praise_count]" type="number"
                   value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Praise_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-praise_user_count" data-rule="required" class="form-control" name="row[praise_user_count]"
                   type="number" value="0">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
